<h2>Why is this an issue?</h2>
<p>Because parameter names could be changed during refactoring, they should not be spelled out literally in strings. Instead, use
<code>NameOf()</code>, and the string that’s output will always be correct.</p>
<p>This rule raises an issue when any string in the <code>Throw</code> statement is an exact match for the name of one of the method parameters.</p>
<h3>Noncompliant code example</h3>
<pre>
Public Sub DoSomething(param As Integer, secondParam As String)
    If (param &lt; 0)
        Throw New Exception("param") ' Noncompliant
    End If
    If secondParam is Nothing
      Throw New Exception("secondParam should be valid") ' Noncompliant
    End If
End Sub
</pre>
<h3>Compliant solution</h3>
<pre>
Public Sub DoSomething(param As Integer, secondParam As String)
    If (param &lt; 0)
        Throw New Exception(NameOf(param))
    End If
    If secondParam is Nothing
      Throw New Exception($"{NameOf(secondParam)} should be valid")
    End If
End Sub
</pre>
<h3>Exceptions</h3>
<ul>
  <li> The rule doesn’t raise any issue when using VB.NET &lt; 14.0. </li>
  <li> When the parameter name is contained in a sentence inside the <code>Throw</code> statement string, the rule will raise an issue only if the
  parameter name is at least 5 characters long. This is to avoid false positives. </li>
</ul>

